home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume6 / yahp2ps / part01 next >
Encoding:
Internet Message Format  |  1989-02-03  |  25.7 KB

  1. Path: xanth!nic.MR.NET!csd4.milw.wisc.edu!leah!itsgw!steinmetz!uunet!allbery
  2. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  3. Newsgroups: comp.sources.misc
  4. Subject: v06i003: HPGL to PostScript converter (Part 1 of 6)
  5. Message-ID: <46899@uunet.UU.NET>
  6. Date: 21 Jan 89 20:27:48 GMT
  7. Sender: allbery@uunet.UU.NET
  8. Reply-To: federico@actisb.UUCP (Federico Heinz)
  9. Organization: ACTIS in Berlin GmbH, W. Germany
  10. Lines: 851
  11. Approved: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  12.  
  13. Posting-number: Volume 6, Issue 3
  14. Submitted-by: federico@actisb.UUCP (Federico Heinz)
  15. Archive-name: yahp2ps/part01
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 1 (of 6)."
  24. # Contents:  Makefile README basic.h char.c char.h circle.h global.h
  25. #   shade.h tick.h yahp2ps.c
  26. # Wrapped by federico@actisb on Wed Jan  4 13:34:44 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'Makefile'\"
  30. else
  31. echo shar: Extracting \"'Makefile'\" \(1230 characters\)
  32. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  33. XCFLAGS        = -O
  34. X
  35. XDEST          = /usr/local
  36. X
  37. XEXTHDRS          =
  38. X
  39. XHDRS          = basic.h \
  40. X        char.h \
  41. X        circle.h \
  42. X        defs.h \
  43. X        dispatch.h \
  44. X        global.h \
  45. X        io.h \
  46. X        mchinery.h \
  47. X        penctrl.h \
  48. X        shade.h \
  49. X        tick.h
  50. X
  51. XLDFLAGS          =
  52. X
  53. XLIBS          =
  54. X
  55. XLINKER          = cc
  56. X
  57. XMAKEFILE      = Makefile
  58. X
  59. XOBJS          = basic.o \
  60. X        char.o \
  61. X        circle.o \
  62. X        dispatch.o \
  63. X        edge.o \
  64. X        global.o \
  65. X        yahp2ps.o \
  66. X        io.o \
  67. X        math.o \
  68. X        mchinery.o \
  69. X        penctrl.o \
  70. X        shade.o \
  71. X        tick.o
  72. X
  73. XPRINT          = pr
  74. X
  75. XPROGRAM          = yahp2ps
  76. X
  77. XSRCS          = basic.c \
  78. X        char.c \
  79. X        circle.c \
  80. X        dispatch.c \
  81. X        edge.c \
  82. X        global.c \
  83. X        yahp2ps.c \
  84. X        io.c \
  85. X        math.c \
  86. X        mchinery.c \
  87. X        penctrl.c \
  88. X        shade.c \
  89. X        tick.c
  90. X
  91. Xall:        $(PROGRAM)
  92. X
  93. X$(PROGRAM):     $(OBJS) $(LIBS)
  94. X        $(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
  95. X
  96. Xclean:;        rm -f $(OBJS)
  97. X
  98. Xdepend:;    mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
  99. X
  100. Xindex:;        ctags -wx $(HDRS) $(SRCS)
  101. X
  102. Xinstall:    $(PROGRAM)
  103. X        install -s $(PROGRAM) $(DEST)
  104. X        install yahp2ps.pre /usr/lib
  105. X
  106. Xprint:;        $(PRINT) $(HDRS) $(SRCS)
  107. X
  108. Xprogram:        $(PROGRAM)
  109. X
  110. Xtags:           $(HDRS) $(SRCS); ctags $(HDRS) $(SRCS)
  111. X
  112. Xupdate:        $(DEST)/$(PROGRAM)
  113. X
  114. X$(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
  115. X        @make -f $(MAKEFILE) DEST=$(DEST) install
  116. X###
  117. END_OF_FILE
  118. if test 1230 -ne `wc -c <'Makefile'`; then
  119.     echo shar: \"'Makefile'\" unpacked with wrong size!
  120. fi
  121. # end of 'Makefile'
  122. fi
  123. if test -f 'README' -a "${1}" != "-c" ; then 
  124.   echo shar: Will not clobber existing file \"'README'\"
  125. else
  126. echo shar: Extracting \"'README'\" \(3093 characters\)
  127. sed "s/^X//" >'README' <<'END_OF_FILE'
  128. XThis directory contains the source code for yahp2ps (you got it: 'Yet
  129. XAnother HPGL to PostScript Converter).  This program takes an HPGL plot
  130. Xfile as input and produces a PostScript language page description as
  131. Xoutput.  This description produces, when interpreted, a printed page
  132. Xthat resembles as closely as possible the result you would have gotten
  133. Xby sending the original HPGL plot file to a plotter.
  134. X
  135. X  yahp2ps supports most of the HPGL language, including specialties like
  136. Xfilled polygons. You shold have no trouble printing anything that
  137. Xdoesn't use the HPGL fonts. One thing I decided not to emulate was the
  138. Xbehaviour of the plotter when it gets a request to draw a circle arc of
  139. Xn degrees with a step angle of s, and both n and s are prime (or at
  140. Xleast mutually prime). I don't know what your plotter does under this
  141. Xcircumstances, mine gets stuck in an endless loop until power cycle.
  142. X
  143. X  Most of the program is non-PostScript specific.  If you want to
  144. Xproduce a HPGL-TO-WHATEVER converter, all you should have to do is
  145. Xreplace the 'machine.c' module by something with the same functionality
  146. X(Murphy permitting). I have compiled and run it on a 68030 BSD 4.3 Unix
  147. Xmachine, but it sould be pretty portable. The only problem I can think
  148. Xof (but then, it's been a long time since I last thought) is that I
  149. Xassume data of type 'Number' to be at least 32-bit integral (I hate
  150. Xfloating point math).
  151. X
  152. XRestrictions:
  153. X
  154. X    * No text commands are implemented. I will eventually get around to
  155. X      do this some time, but I haven't had the time. This restriction
  156. X      also implies that you can't get centered chars at segment endings.
  157. X    * No color support (I haven't been even near a color PostScript
  158. X      printer). You may define a thickness and a gray level for each
  159. X      pen, however. On a related topic, if an area is written over with
  160. X      one pen, and later with another, the last gray level will prevail.
  161. X    * Only DIN A4 paper size has been really tested.  There are
  162. X      provisions for the other sizes in the code (there are provisions
  163. X      for text support too), but I havn't got around to test them.
  164. X    * No commands requiring responses from the plotter are implemented
  165. X      (for instance the commands for digitizing).
  166. X    * The prelude isn't "Adobe conformant". It doesn't do anything
  167. X      weird anyway, it's just that the field names and such stuff
  168. X      aren't there. I use the 'setmatrix' PostScript command to allow
  169. X      distorting and restoring of user space without affecting other
  170. X      parameters, but this should have no ill effects since it's done
  171. X      under controlled conditions.
  172. X    * No documentation (I guess I will eventually resign and decide to
  173. X      learn how to use [tn]roff). The program's function is quite
  174. X      obvious, though, so that you shouldn't have problems using it.
  175. X      If you do, try entering 'yahp2ps -' to get the 'Usage' line.
  176. X      If that doesn't help, look at 'main' in 'yahp2ps.c', if everything
  177. X      else fails, contact me.
  178. X
  179. X
  180. Xyahp2ps is free software.  See the file COPYING for copying permission. 
  181. X
  182. X            Federico Heinz
  183. END_OF_FILE
  184. if test 3093 -ne `wc -c <'README'`; then
  185.     echo shar: \"'README'\" unpacked with wrong size!
  186. fi
  187. # end of 'README'
  188. fi
  189. if test -f 'basic.h' -a "${1}" != "-c" ; then 
  190.   echo shar: Will not clobber existing file \"'basic.h'\"
  191. else
  192. echo shar: Extracting \"'basic.h'\" \(1671 characters\)
  193. sed "s/^X//" >'basic.h' <<'END_OF_FILE'
  194. X/*
  195. X        HPGL to PostScript converter
  196. X   Copyright (C) 1988 (and following) Federico Heinz
  197. X
  198. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  199. XWARRANTY.  No author or distributor accepts responsibility to anyone
  200. Xfor the consequences of using it or for whether it serves any
  201. Xparticular purpose or works at all, unless he says so in writing.
  202. XRefer to the Free Software Foundation's General Public License for full details.
  203. X
  204. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  205. Xbut only under the conditions described in the GNU General Public
  206. XLicense.  A copy of this license is supposed to have been given to you
  207. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  208. Xshould be in a file named COPYING.  Among other things, the copyright
  209. Xnotice and this notice must be preserved on all copies.
  210. X
  211. XIn other words, go ahead and share yahp2ps, but don't try to stop
  212. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  213. X
  214. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  215. Xit is only released under the same conditions.
  216. X
  217. X    For bug reports, wishes, etc. send e-mail to
  218. X
  219. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  220. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  221. X
  222. X    For Physical mail:
  223. X
  224. X    Federico Heinz
  225. X    Beusselstr. 21
  226. X    1000 Berlin 21
  227. X
  228. X    Tel. (+49 30) 396 77 92
  229. X
  230. X*/
  231. X/**************************************************************************
  232. X
  233. X   Definitions for basical movement routines.
  234. X
  235. X**************************************************************************/
  236. X
  237. X
  238. X/* Restore the module's default parameters */
  239. X
  240. Xextern void basicInit();
  241. X
  242. END_OF_FILE
  243. if test 1671 -ne `wc -c <'basic.h'`; then
  244.     echo shar: \"'basic.h'\" unpacked with wrong size!
  245. fi
  246. # end of 'basic.h'
  247. fi
  248. if test -f 'char.c' -a "${1}" != "-c" ; then 
  249.   echo shar: Will not clobber existing file \"'char.c'\"
  250. else
  251. echo shar: Extracting \"'char.c'\" \(2561 characters\)
  252. sed "s/^X//" >'char.c' <<'END_OF_FILE'
  253. X/*
  254. X        HPGL to PostScript converter
  255. X   Copyright (C) 1988 (and following) Federico Heinz
  256. X
  257. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  258. XWARRANTY.  No author or distributor accepts responsibility to anyone
  259. Xfor the consequences of using it or for whether it serves any
  260. Xparticular purpose or works at all, unless he says so in writing.
  261. XRefer to the Free Software Foundation's General Public License for full details.
  262. X
  263. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  264. Xbut only under the conditions described in the GNU General Public
  265. XLicense.  A copy of this license is supposed to have been given to you
  266. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  267. Xshould be in a file named COPYING.  Among other things, the copyright
  268. Xnotice and this notice must be preserved on all copies.
  269. X
  270. XIn other words, go ahead and share yahp2ps, but don't try to stop
  271. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  272. X
  273. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  274. Xit is only released under the same conditions.
  275. X
  276. X    For bug reports, wishes, etc. send e-mail to
  277. X
  278. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  279. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  280. X
  281. X    For Physical mail:
  282. X
  283. X    Federico Heinz
  284. X    Beusselstr. 21
  285. X    1000 Berlin 21
  286. X
  287. X    Tel. (+49 30) 396 77 92
  288. X
  289. X*/
  290. X/************************************************************************
  291. X
  292. X  Character drawing stuff.
  293. X
  294. X************************************************************************/
  295. X
  296. X#include "defs.h"
  297. X#include "dispatch.h"
  298. X
  299. X
  300. X/*
  301. X
  302. X  Reset this module's default parameters.
  303. X
  304. X*/
  305. X
  306. Xvoid charInit()
  307. X
  308. X{ }
  309. X
  310. X
  311. XCommandImplementation setAlternateChar()
  312. X
  313. X{ notImplemented(); }
  314. X
  315. X
  316. XCommandImplementation characterPlot()
  317. X
  318. X{ notImplemented(); }
  319. X
  320. X
  321. XCommandImplementation setStandardChar()
  322. X
  323. X{ notImplemented(); }
  324. X
  325. X
  326. XCommandImplementation setAbsoluteDirection()
  327. X
  328. X{ notImplemented(); }
  329. X
  330. X
  331. X
  332. XCommandImplementation setRelativeDirection()
  333. X
  334. X{ notImplemented(); }
  335. X
  336. X
  337. X
  338. XCommandImplementation setLabelTerminator()
  339. X
  340. X{ notImplemented(); }
  341. X
  342. X
  343. X
  344. XCommandImplementation putASCIILabel()
  345. X
  346. X{ notImplemented(); }
  347. X
  348. X
  349. X
  350. XCommandImplementation selectAlternate()
  351. X
  352. X{ notImplemented(); }
  353. X
  354. X
  355. X
  356. XCommandImplementation setAbsoluteCharSize()
  357. X
  358. X{ notImplemented(); }
  359. X
  360. X
  361. X
  362. XCommandImplementation setAbsoluteCharSlant()
  363. X
  364. X{ notImplemented(); }
  365. X
  366. X
  367. X
  368. XCommandImplementation setRelativeCharSize()
  369. X
  370. X{ notImplemented(); }
  371. X
  372. X
  373. X
  374. XCommandImplementation selectStandard()
  375. X
  376. X{ notImplemented(); }
  377. X
  378. X
  379. X
  380. XCommandImplementation userChar()
  381. X
  382. X{ notImplemented(); }
  383. X
  384. X
  385. X
  386. X
  387. END_OF_FILE
  388. if test 2561 -ne `wc -c <'char.c'`; then
  389.     echo shar: \"'char.c'\" unpacked with wrong size!
  390. fi
  391. # end of 'char.c'
  392. fi
  393. if test -f 'char.h' -a "${1}" != "-c" ; then 
  394.   echo shar: Will not clobber existing file \"'char.h'\"
  395. else
  396. echo shar: Extracting \"'char.h'\" \(1657 characters\)
  397. sed "s/^X//" >'char.h' <<'END_OF_FILE'
  398. X/*
  399. X        HPGL to PostScript converter
  400. X   Copyright (C) 1988 (and following) Federico Heinz
  401. X
  402. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  403. XWARRANTY.  No author or distributor accepts responsibility to anyone
  404. Xfor the consequences of using it or for whether it serves any
  405. Xparticular purpose or works at all, unless he says so in writing.
  406. XRefer to the Free Software Foundation's General Public License for full details.
  407. X
  408. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  409. Xbut only under the conditions described in the GNU General Public
  410. XLicense.  A copy of this license is supposed to have been given to you
  411. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  412. Xshould be in a file named COPYING.  Among other things, the copyright
  413. Xnotice and this notice must be preserved on all copies.
  414. X
  415. XIn other words, go ahead and share yahp2ps, but don't try to stop
  416. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  417. X
  418. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  419. Xit is only released under the same conditions.
  420. X
  421. X    For bug reports, wishes, etc. send e-mail to
  422. X
  423. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  424. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  425. X
  426. X    For Physical mail:
  427. X
  428. X    Federico Heinz
  429. X    Beusselstr. 21
  430. X    1000 Berlin 21
  431. X
  432. X    Tel. (+49 30) 396 77 92
  433. X
  434. X*/
  435. X/*************************************************************************
  436. X
  437. X  Definitions for char handling routines.
  438. X
  439. X************************************************************************/
  440. X
  441. X
  442. X/* Reset the module's default status */
  443. X
  444. Xextern void charInit();
  445. X
  446. END_OF_FILE
  447. if test 1657 -ne `wc -c <'char.h'`; then
  448.     echo shar: \"'char.h'\" unpacked with wrong size!
  449. fi
  450. # end of 'char.h'
  451. fi
  452. if test -f 'circle.h' -a "${1}" != "-c" ; then 
  453.   echo shar: Will not clobber existing file \"'circle.h'\"
  454. else
  455. echo shar: Extracting \"'circle.h'\" \(2381 characters\)
  456. sed "s/^X//" >'circle.h' <<'END_OF_FILE'
  457. X/*
  458. X        HPGL to PostScript converter
  459. X   Copyright (C) 1988 (and following) Federico Heinz
  460. X
  461. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  462. XWARRANTY.  No author or distributor accepts responsibility to anyone
  463. Xfor the consequences of using it or for whether it serves any
  464. Xparticular purpose or works at all, unless he says so in writing.
  465. XRefer to the Free Software Foundation's General Public License for full details.
  466. X
  467. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  468. Xbut only under the conditions described in the GNU General Public
  469. XLicense.  A copy of this license is supposed to have been given to you
  470. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  471. Xshould be in a file named COPYING.  Among other things, the copyright
  472. Xnotice and this notice must be preserved on all copies.
  473. X
  474. XIn other words, go ahead and share yahp2ps, but don't try to stop
  475. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  476. X
  477. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  478. Xit is only released under the same conditions.
  479. X
  480. X    For bug reports, wishes, etc. send e-mail to
  481. X
  482. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  483. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  484. X
  485. X    For Physical mail:
  486. X
  487. X    Federico Heinz
  488. X    Beusselstr. 21
  489. X    1000 Berlin 21
  490. X
  491. X    Tel. (+49 30) 396 77 92
  492. X
  493. X*/
  494. X/**************************************************************************
  495. X
  496. X  Definition of circle/arc support arithmetic
  497. X
  498. X**************************************************************************/
  499. X
  500. X
  501. X#define MinimumChordForWedge   40000L  /* For wedges only */
  502. X#define MaximumChordAngle    1200000L  /* For wedges only */
  503. X#define DefaultChordAngle      50000L
  504. X
  505. X#define OneSquare             900000L
  506. X#define TwoSquares           1800000L
  507. X#define ThreeSquares         2700000L
  508. X#define FullCircle           3600000L
  509. X
  510. X
  511. X/* Compute an acceptable chord angle */
  512. X
  513. Xextern Number correctedChordAngle();
  514. X
  515. X
  516. X/* Twist the start and the sweep angles so as to make sense. */
  517. X
  518. Xextern void fixUpStartAndSweep();
  519. X
  520. X
  521. X/* Compute the position of a point at polar coordinates from a point */
  522. X
  523. Xextern void polarToCartesian();
  524. X
  525. X
  526. X
  527. X/* Compute the angle and hypotenuse that produces these cathetes */
  528. X
  529. Xextern void cartesianToPolar();
  530. X
  531. X
  532. X
  533. X/* Get the optional chord angle parameter */
  534. X
  535. Xextern void getChordAngle();
  536. END_OF_FILE
  537. if test 2381 -ne `wc -c <'circle.h'`; then
  538.     echo shar: \"'circle.h'\" unpacked with wrong size!
  539. fi
  540. # end of 'circle.h'
  541. fi
  542. if test -f 'global.h' -a "${1}" != "-c" ; then 
  543.   echo shar: Will not clobber existing file \"'global.h'\"
  544. else
  545. echo shar: Extracting \"'global.h'\" \(1810 characters\)
  546. sed "s/^X//" >'global.h' <<'END_OF_FILE'
  547. X/*
  548. X        HPGL to PostScript converter
  549. X   Copyright (C) 1988 (and following) Federico Heinz
  550. X
  551. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  552. XWARRANTY.  No author or distributor accepts responsibility to anyone
  553. Xfor the consequences of using it or for whether it serves any
  554. Xparticular purpose or works at all, unless he says so in writing.
  555. XRefer to the Free Software Foundation's General Public License for full details.
  556. X
  557. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  558. Xbut only under the conditions described in the GNU General Public
  559. XLicense.  A copy of this license is supposed to have been given to you
  560. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  561. Xshould be in a file named COPYING.  Among other things, the copyright
  562. Xnotice and this notice must be preserved on all copies.
  563. X
  564. XIn other words, go ahead and share yahp2ps, but don't try to stop
  565. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  566. X
  567. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  568. Xit is only released under the same conditions.
  569. X
  570. X    For bug reports, wishes, etc. send e-mail to
  571. X
  572. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  573. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  574. X
  575. X    For Physical mail:
  576. X
  577. X    Federico Heinz
  578. X    Beusselstr. 21
  579. X    1000 Berlin 21
  580. X
  581. X    Tel. (+49 30) 396 77 92
  582. X
  583. X*/
  584. X/*************************************************************************
  585. X
  586. X    Definition of global status routines.
  587. X
  588. X*************************************************************************/
  589. X
  590. X
  591. X#define PaperSizeLimit 40000 /* Smaller means A3, bigger means A4 */
  592. X
  593. X
  594. X/* Restore this module's default status */
  595. X
  596. Xextern void globalInit();
  597. X
  598. X
  599. X/* Restore all modules' default status */
  600. X
  601. Xextern void restoreDefaults();
  602. X
  603. END_OF_FILE
  604. if test 1810 -ne `wc -c <'global.h'`; then
  605.     echo shar: \"'global.h'\" unpacked with wrong size!
  606. fi
  607. # end of 'global.h'
  608. fi
  609. if test -f 'shade.h' -a "${1}" != "-c" ; then 
  610.   echo shar: Will not clobber existing file \"'shade.h'\"
  611. else
  612. echo shar: Extracting \"'shade.h'\" \(1842 characters\)
  613. sed "s/^X//" >'shade.h' <<'END_OF_FILE'
  614. X/*
  615. X        HPGL to PostScript converter
  616. X   Copyright (C) 1988 (and following) Federico Heinz
  617. X
  618. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  619. XWARRANTY.  No author or distributor accepts responsibility to anyone
  620. Xfor the consequences of using it or for whether it serves any
  621. Xparticular purpose or works at all, unless he says so in writing.
  622. XRefer to the Free Software Foundation's General Public License for full details.
  623. X
  624. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  625. Xbut only under the conditions described in the GNU General Public
  626. XLicense.  A copy of this license is supposed to have been given to you
  627. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  628. Xshould be in a file named COPYING.  Among other things, the copyright
  629. Xnotice and this notice must be preserved on all copies.
  630. X
  631. XIn other words, go ahead and share yahp2ps, but don't try to stop
  632. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  633. X
  634. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  635. Xit is only released under the same conditions.
  636. X
  637. X    For bug reports, wishes, etc. send e-mail to
  638. X
  639. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  640. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  641. X
  642. X    For Physical mail:
  643. X
  644. X    Federico Heinz
  645. X    Beusselstr. 21
  646. X    1000 Berlin 21
  647. X
  648. X    Tel. (+49 30) 396 77 92
  649. X
  650. X*/
  651. X/**********************************************************************
  652. X
  653. X  Definitions for figure shading.
  654. X
  655. X**********************************************************************/
  656. X
  657. X#define DefaultFillSpacing 1232200L
  658. X#define ParallelLines 30000
  659. X
  660. X#define DefaultFillType One
  661. X
  662. X#define DefaultPenWidth    03000L
  663. X#define MinPenWidth     01000L
  664. X#define MaxPenWidth     50000L
  665. X
  666. X
  667. X/* Restore the module's status to the default. */
  668. X
  669. Xextern void shadeInit();
  670. END_OF_FILE
  671. if test 1842 -ne `wc -c <'shade.h'`; then
  672.     echo shar: \"'shade.h'\" unpacked with wrong size!
  673. fi
  674. # end of 'shade.h'
  675. fi
  676. if test -f 'tick.h' -a "${1}" != "-c" ; then 
  677.   echo shar: Will not clobber existing file \"'tick.h'\"
  678. else
  679. echo shar: Extracting \"'tick.h'\" \(1779 characters\)
  680. sed "s/^X//" >'tick.h' <<'END_OF_FILE'
  681. X/*
  682. X        HPGL to PostScript converter
  683. X   Copyright (C) 1988 (and following) Federico Heinz
  684. X
  685. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  686. XWARRANTY.  No author or distributor accepts responsibility to anyone
  687. Xfor the consequences of using it or for whether it serves any
  688. Xparticular purpose or works at all, unless he says so in writing.
  689. XRefer to the Free Software Foundation's General Public License for full details.
  690. X
  691. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  692. Xbut only under the conditions described in the GNU General Public
  693. XLicense.  A copy of this license is supposed to have been given to you
  694. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  695. Xshould be in a file named COPYING.  Among other things, the copyright
  696. Xnotice and this notice must be preserved on all copies.
  697. X
  698. XIn other words, go ahead and share yahp2ps, but don't try to stop
  699. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  700. X
  701. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  702. Xit is only released under the same conditions.
  703. X
  704. X    For bug reports, wishes, etc. send e-mail to
  705. X
  706. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  707. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  708. X
  709. X    For Physical mail:
  710. X
  711. X    Federico Heinz
  712. X    Beusselstr. 21
  713. X    1000 Berlin 21
  714. X
  715. X    Tel. (+49 30) 396 77 92
  716. X
  717. X*/
  718. X/************************************************************************
  719. X
  720. X   Interface to Tick drawing module.
  721. X
  722. X************************************************************************/
  723. X
  724. X
  725. X#define InitialTick    5000L
  726. X
  727. X
  728. X
  729. X/* Adjust the tick parameters to a new environment */
  730. X
  731. Xextern void updateTicks();
  732. X
  733. X
  734. X
  735. X/* Reset the tick parameters to the default values */
  736. X
  737. Xextern void tickInit();
  738. X
  739. END_OF_FILE
  740. if test 1779 -ne `wc -c <'tick.h'`; then
  741.     echo shar: \"'tick.h'\" unpacked with wrong size!
  742. fi
  743. # end of 'tick.h'
  744. fi
  745. if test -f 'yahp2ps.c' -a "${1}" != "-c" ; then 
  746.   echo shar: Will not clobber existing file \"'yahp2ps.c'\"
  747. else
  748. echo shar: Extracting \"'yahp2ps.c'\" \(2523 characters\)
  749. sed "s/^X//" >'yahp2ps.c' <<'END_OF_FILE'
  750. X/*
  751. X        HPGL to PostScript converter
  752. X   Copyright (C) 1988 (and following) Federico Heinz
  753. X
  754. Xyahp2ps is distributed in the hope that it will be useful, but WITHOUT ANY
  755. XWARRANTY.  No author or distributor accepts responsibility to anyone
  756. Xfor the consequences of using it or for whether it serves any
  757. Xparticular purpose or works at all, unless he says so in writing.
  758. XRefer to the Free Software Foundation's General Public License for full details.
  759. X
  760. XEveryone is granted permission to copy, modify and redistribute yahp2ps,
  761. Xbut only under the conditions described in the GNU General Public
  762. XLicense.  A copy of this license is supposed to have been given to you
  763. Xalong with yahp2ps so you can know your rights and responsibilities.  It
  764. Xshould be in a file named COPYING.  Among other things, the copyright
  765. Xnotice and this notice must be preserved on all copies.
  766. X
  767. XIn other words, go ahead and share yahp2ps, but don't try to stop
  768. Xanyone else from sharing it farther.  Help stamp out software hoarding!
  769. X
  770. Xyahp2ps is TOTALLY unrelated to GNU or the Free Software Foundation,
  771. Xit is only released under the same conditions.
  772. X
  773. X    For bug reports, wishes, etc. send e-mail to
  774. X
  775. X    ...!mcvax!unido!tub!actisb!federico  (from Europe)
  776. X    ...!uunet!pyramid!actisb!federico    (from anywhere else)
  777. X
  778. X    For Physical mail:
  779. X
  780. X    Federico Heinz
  781. X    Beusselstr. 21
  782. X    1000 Berlin 21
  783. X
  784. X    Tel. (+49 30) 396 77 92
  785. X
  786. X*/
  787. X#include <stdio.h>
  788. X#include "defs.h"
  789. X#include "dispatch.h"
  790. X#include "mchinery.h"
  791. X
  792. XNumber TN;  /* Temporary storage for Number math */
  793. X
  794. Xmain(argc, argv)
  795. X
  796. Xint argc;
  797. Xchar **argv;
  798. X
  799. X{ while (--argc)
  800. X  { argv++;
  801. X    if (**argv == '-')
  802. X      switch(*((*argv)+1))
  803. X      { case 'l':
  804. X          if (argc-1)
  805. X          { getPenSizes(*(++argv));
  806. X            argc--;
  807. X          }
  808. X          break;
  809. X        case 'o':
  810. X          if (argc-1)
  811. X          { if (!setOutput(*(++argv)))
  812. X              error("Unable to open target file.");
  813. X            argc--;
  814. X          }
  815. X          break;
  816. X        case 'p':
  817. X          if (argc-1)
  818. X          { if (PreludeFile != NULL)
  819. X              PreludeFile = *(++argv);
  820. X            argc--;
  821. X          }
  822. X          break;
  823. X        case 's':
  824. X          PreludeFile = NULL;
  825. X          break;
  826. X        default:
  827. X          error("Usage: hpgl2ps [-l <linesizes>] [-p <preludefile>] [-s] [-o <outputfile>] inputfile");
  828. X          break;
  829. X      }
  830. X    else
  831. X      if (!setInput(*argv))
  832. X        error("Unable to open source file.");
  833. X  }
  834. X  initializeMachinery();
  835. X  penctrlInit();
  836. X  restoreDefaults();
  837. X  dispatch();
  838. X  shutdownMachinery();
  839. X}
  840. X
  841. END_OF_FILE
  842. if test 2523 -ne `wc -c <'yahp2ps.c'`; then
  843.     echo shar: \"'yahp2ps.c'\" unpacked with wrong size!
  844. fi
  845. # end of 'yahp2ps.c'
  846. fi
  847. echo shar: End of archive 1 \(of 6\).
  848. cp /dev/null ark1isdone
  849. MISSING=""
  850. for I in 1 2 3 4 5 6 ; do
  851.     if test ! -f ark${I}isdone ; then
  852.     MISSING="${MISSING} ${I}"
  853.     fi
  854. done
  855. if test "${MISSING}" = "" ; then
  856.     echo You have unpacked all 6 archives.
  857.     rm -f ark[1-9]isdone
  858. else
  859.     echo You still need to unpack the following archives:
  860.     echo "        " ${MISSING}
  861. fi
  862. ##  End of shell archive.
  863. exit 0
  864.